A1 = readmatrix('NiI2_CPGE_switch_680_24V_30K.txt')
A2 = readmatrix('NiI2_CPGE_switch_680_24V_40K.txt')
A3 = readmatrix('NiI2_CPGE_switch_680_24V_50K.txt')
A4 = readmatrix('NiI2_CPGE_switch_680_24V_60K.txt')

x1 = A1(:,1)
y1 = A1(:,2)*1e12+0.35

x2 = A2(2:41,1)-20
y2 = A2(2:41,2)*1e12-0.05

x3 = A3(:,1)
y3 = A3(:,2)*1e12+1.55

x4 = A4(21:60,1)-20
y4 = A4(21:60,2)*1e12-0.25

for i = 1:40
    y1(i) = y1(i)+i*0.003
end

for i = 1:40
    y2(i) = y2(i)+i*0.003
end

for i = 1:40
    y3(i) = y3(i)+i*0.002
end

for i = 1:40
    y4(i) = y4(i)+i*0.002
end

hold on
xlim([0, 40])
plot(x1,y1,'Linewidth',1,'Color',[0.2 0 0.8])
plot(x2,y2,'Linewidth',1,'Color',[0.4 0 0.6])
plot(x3,y3,'Linewidth',1,'Color',[0.6 0 0.4])
plot(x4,y4,'Linewidth',1,'Color',[0.8 0 0.2])
xlabel('Polarization')
ylabel('Photocurrent [pA]')
ylim([1,2])
yticks(0:0.4:1.2)
xticklabels({})
yticklabels({})
%set(gca,'XMinorTick','on','YMinorTick','on')
set(gca,'box','on','Xcolor',[0 0 0],'Ycolor',[0 0 0])
hold off

set(gcf,'Position',[0, 0, 200, 185])